<meta http-equiv="X-UA-Compatible" content="IE=10" />
<meta content="text/html; charset=UTF-8; X-Content-Type-Options=nosniff" http-equiv="Content-Type" />
<!-- user list window -->
<div id="wp_all_liked_user_list_window">
		<div id="wp_all_liked_user_list_window_content" class="wp_w_384 wp_ml_15 wp_mr_15 wp_mb_10 wp_mt_ne10" data-template="wp_all_liked_user_list_template" data-bind="source:user_list"></div>
</div>
<script type="text/x-kendo-template" id="wp_all_liked_user_list_template">
	<div class="wp_w_162 wp_mb_20 wp_w_354">
		<img class="left wp_w_20 wp_h_20 wp_appstools_hand" data-bind="attr:{src:UserImageURL}, click:clickUserName" onerror="onDefaultThumbnailWanted(this, 'U')">
		<span class="wp_fz_12 wp_ml_15 wp_mt_5 left wp_appstools_hand" data-bind="click:clickUserName">#: data.UserName #</span>
		<div class="clear"></div>
	</div>
</script>

<script type="text/javascript">
var wp_all_liked_users = (function() {
	
	var viewmodel = kendo.observable({
		user_list:[],
		clickUserName:function(e){
			homepageProfileWin.user_info_win_create(e.data.UserId);
		}
	});

	kendo.bind($("#wp_all_liked_user_list_window"), viewmodel);
	var user_list_win = $('#wp_all_liked_user_list_window');
	user_list_win.kendoWindow({
		width:400,
		height:40,
		title:"Liked Users",
		visible:false,
		model:true,
		draggable: false,
		resizable: false,
		modal: true,
		actions:["Close"],
		close:function(){
			viewmodel.set("user_list",[]);
		}
	});
	var useragent = Workport.getBrowser();
	if(useragent == 'ipad'){
		$('#wp_all_liked_user_list_window_content').css('margin-top','13px');
	} else if (useragent == 'ie10' || useragent == 'ie11') {
		$('#wp_all_liked_user_list_window_content').css('margin-top','5px');
	}
	if( useragent == 'chrome' || useragent == 'ie10' || useragent == 'ie11'){
		$('#wp_all_liked_user_list_window_content').css('margin-top','15px');
	}
	return {
		openUserListWindow:function(userList){
			//console.log(userList);
			viewmodel.set("user_list",userList);
			if (useragent == 'ie10' || useragent == 'ie11') {
				$('#wp_all_liked_user_list_window_content').find('span').css('margin-top','4px');
			}
			user_list_win.data("kendoWindow").center();
			user_list_win.data("kendoWindow").open(); 
			var height=$("#wp_all_liked_user_list_window_content").height();					
			if(userList.length>8){
				$('#wp_all_liked_user_list_window_content').slimScroll({
					 		height: height+'px',
					 		width:'180px'
				});
				$('#wp_all_liked_user_list_window_content').css("margin-top","10px");
			}else if(userList.length==1){
				var thisHeight=height+25+"px";
				$('#wp_all_liked_user_list_window').css("height",thisHeight);
			}else{
				var thisHeight=height+25+"px";
				$('#wp_all_liked_user_list_window').css("height",thisHeight);
			}
		}
	};
	
})();
</script>

